/*
 * Serum
 *
 * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
 */

Serum.Grid.Module.Toolbar.FilterTimeButton = function(viewer) {
    return {
            tooltip:    {title: __('base~list_action_filter_title'), text: __('base~list_action_filter_description')},
            iconCls:    'img-filter',

            menu: {
                items: [
                    {
                        text: __('tecdocproducts~list_action_filter_time'),
                        menu: {
                            items: [
                                new Ext.menu.CheckItem({
                                    text:           __('tecdocproducts~list_action_filter_time_recent'),
                                    checked:        true,
                                    checkHandler:   viewer.onItemCheck,
                                    scope:          viewer,
                                    id:             'filter_time_recent'
                                }),
                                new Ext.menu.CheckItem({
                                    text:           __('tecdocproducts~list_action_filter_time_old'),
                                    checked:        true,
                                    checkHandler:   viewer.onItemCheck,
                                    scope:          viewer,
                                    id:             'filter_time_old'
                                })
                            ]
                        }
                    }
                ]
            }
        };
};